package demo5;

/**
 * @Author 12629
 * @Description：
 */
public class OuterClass {

    public int data1 = 1;
    private int data2 = 2;
    public static int data3 = 3;


    public void test() {
        System.out.println("out::test方法");
    }

    //静态内部类
    static class InnerClass {
        public int data4 = 4;
        public static int data5 = 5;

        public void func() {
            System.out.println("InnerClass::func()");
            OuterClass outerClass = new OuterClass();
            System.out.println(outerClass.data1);
            System.out.println(outerClass.data2);
            System.out.println(data3);
            System.out.println(data4);
            System.out.println(data5);
        }
    }

}
